<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>查看发布的任务信息</title>
    <link rel="stylesheet" type="text/css" href="../../easyui/themes/default/easyui.css">
    <link rel="stylesheet" type="text/css" href="../../easyui/themes/icon.css">
    <script type="text/javascript" src="../../easyui/jquery.min.js"></script>
    <script type="text/javascript" src="../../easyui/jquery.easyui.min.js"></script>

    <script type="text/javascript" th:inline="none">
        $(function () {
            $('#taskDataGrid').datagrid({
                rownumbers:true,//显示行号
                pagination:true,//在dataGrid组件的底部显示分页工具栏效果
                pageSize:2,//设置每页显示两条数据
                pageList:[2,4,6],//设置分页组件中每页显示的数据量的下拉框中的数据
                title:'查询结果',
                toolbar:'#tb',//设置DataGrid组建的工具栏效果
                autoRowHeight:false,
                url:"task/showTask",//主持人信息加载的后台url地址

                columns:[[
                    {field:'aa',title:'aa',checkbox:true},
                    {field:'taskId',title:'任务编号',width:250,align:'center',hidden:true},
                    {field:'taskName',title:'标题',width:250,align:'center'},
                    {field:'endTime',title:'截至时间',width:250,align:'center'},
                    {field:'userName',title:'执行人员',width:250,align:'center',formatter:
                            function (value,rows,index) {
                                return rows.user.userName;
                            }
                    },
                    {field:'taskStatus',title:'状态',width:250,align:'center',formatter:
                            function (value, rows, index) {
                                if (value==0){
                                    return "完成";
                                }else if (value==1) {
                                    return "未完成";
                                }else {
                                    return "放弃完成"
                                }
                            }
                    },
                    {field:'taskIsUrgent',title:'紧急程度',width:250,align:'center',formatter:
                            function (value, rows, index) {
                                if (value==0){
                                    return "紧急";
                                }else {
                                    return "不紧急";
                                }
                            }
                    }
                ]]
            });
        });
    </script>

</head>
<body>

<!--申明panel面板-->
<div id="p" class="easyui-panel" title=""
     style="width:500px;height:150px;padding:10px;background:#fafafa;"
     data-options="fit:true">

    <!--头部查询条件-->
    <div style="margin-bottom:20px;margin-left: 200px;margin-top: 30px">
        <input class="easyui-textbox" name="taskName" id="taskName" style="width:300px" data-options="label:'任务标题:',required:true">
        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
        <a href="javascript:void(0)" class="easyui-linkbutton" onclick="showBtn()" style="width:80px">查询</a>
    </div>

    <!--使用DataGrid组件完成页面的-->
    <div style="width: 80%;margin: auto;margin-top: 50px">
        <table id="taskDataGrid"></table>
    </div>

    <div id="tb">
        <a id="updateTask" href="javascript:void(0)" class="easyui-linkbutton" data-options="iconCls:'icon-add',plain:true">任务修改</a>
        <a id="removeTask" href="javascript:void(0)" class="easyui-linkbutton" data-options="iconCls:'icon-edit',plain:true">任务删除</a>
    </div>

</div>

</body>
</html>